<?php
include_once('blocks/navigator.php');
$from = (($page - 1) * max_picture);
$select = 'name,url_hinh';
$table = 'photo_gallery';
$where = "`delete`=0 AND status=1 AND menu_id LIKE '%,".$row_menu_one['id'].",%'";
$limit = "LIMIT {$from},".max_picture;
$list = $tc->list_item($select,$table,$where,$limit);

$view_post .= '<div id="photos"><ul class="gallery clearfix">';
while($row = mysql_fetch_array($list)){
	$view_post .= '<li><a href="'.url_photo_gallery.$row['url_hinh'].'" rel="prettyPhoto[gallery1]">
	<img class="img" src="'.url_photo_gallery_thumb.$row['url_hinh'].'" alt="'.$row['name'].'" /></a></li>';
}
$view_post .= '</ul></div>
<div style="clear:both; height:30px"></div>
<link rel="stylesheet" href="library/slider_pic/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
<script src="library/slider_pic/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">$(document).ready(function(){$(".gallery a[rel^=\'prettyPhoto\']").prettyPhoto({theme:\'facebook\'});});</script>';

$phantrang = $tc->phantrang($row_menu_one['url'],$page,max_picture,'id',$table,$where);
$view_post .= "<div id=\"phantrang\">{$phantrang}</div>";